

******************************** INCLUSION WITHOUT SOLIDARIETY : ****************************

*                 Education, economic security, and attitudes towards redistribution        *

***                      Dr. Margarita Gelepithis       Dr. Marco Giani                   ***

*********************************************************************************************

*                    Replication material for Table 1, Table 2 and Figure 2                 * 


*Note 1: please install psmatch through ssc

*Note 2: notice that the matching analysis takes time and requires going through stata errors due to poor matches that are increasingly pruned until the 4th step. Hence if you want to run the whole code copy/pasting is better choice than executing

*Note 3: the figure looks different than that in the paper, which is done by copy/pasting coefficients and confidence intervals in excel. this was a pure aesthetic choice


clear all
use Data.dta
set more off

 keep redistribution race immi vocation uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp ideology polintr religion country essround  smegbhw trstprl ppltrst  imm_culture
 

 ******   TABLE 1   ****** ****** ****** ****** ****** ****** 

 * Model (i)
reg redistribution uni i.country i.essround, cluster(country)
 * Model (ii)
reg redistribution uni agea squaredagea female i.country i.essround, cluster(country)
 * Model (iii)
reg redistribution uni agea squaredagea female uni_dad uni_mum i.country i.essround, cluster(country)
 * Model (iv)
reg redistribution uni agea squaredagea female uni_dad uni_mum income income_feel i.country i.essround, cluster(country)
 * Model (v)
reg redistribution uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround, cluster(country)
 * Model (vi)
reg redistribution uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp ideology polintr religion i.country i.essround, cluster(country)
 
 * Model (vii)
 
	 teffects nnmatch (redistribution agea  income income_feel ideology polintr religion) (uni), ematch(female uni_mum     uni_dad     highss outsider2 pastunemp country essround) biasadj(agea  income income_feel ideology polintr religion) osample(new) 
     drop if new==1
	 teffects nnmatch (redistribution agea  income income_feel ideology polintr religion) (uni), ematch(female uni_mum     uni_dad     highss outsider2 pastunemp country essround) biasadj(agea  income income_feel ideology polintr) osample(new2)   
	 drop if new2==1
	 teffects nnmatch (redistribution agea  income income_feel ideology polintr religion) (uni), ematch(female uni_mum     uni_dad     highss outsider2 pastunemp country essround) biasadj(agea  income income_feel ideology polintr) osample(new3)  
	 drop if new3==1
	 teffects nnmatch (redistribution agea  income income_feel ideology polintr religion) (uni), ematch(female uni_mum     uni_dad     highss outsider2 pastunemp country essround) biasadj(agea  income income_feel ideology polintr) osample(new4)  
 

******   FIGURE 1: SEVERAL ATTITUDES   ****** ****** ****** ****** ****** ****** 

clear all
use clean.dta
set more off  

preserve 

center redistribution imm_culture smegbhw smegbli ppltrst trstprl agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp, inplace standardize nolabel

reg redistribution uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround, cluster(country)
 est store redistributiona 
  
reg imm_culture uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround, cluster(country)
 est store immi
 
reg  smegbhw uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround, cluster(country)
 est store race
 
reg ppltrst uni agea squaredagea female uni_parents income income_feel highss outsider2 pastunemp  i.country i.essround, cluster(country)
 est store social
  
 reg trstprl uni agea squaredagea female uni_parents income income_feel highss outsider2 pastunemp  i.country i.essround, cluster(country)
 est store political

 coefplot (immi, label(U)  pstyle(p10))  (race, label(U)  pstyle(p10)) (social, label(C)  pstyle(p10)) (political, label(I)  pstyle(p10))  , vertical keep(uni) yline(0) msymbol(S) ciopts(recast(rcap))



 ******   TABLE 2  ****** ****** ****** ****** ****** ******   
 
clear all
use clean.dta
set more off


reg redistribution vocation agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if uni==0
est store vocation
reg redistribution uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if vocation==0
est store uni
suest vocation uni, cluster(country)
test vocation  == uni 

reg immi vocation agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if uni==0
est store vocation
reg immi uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if vocation==0
est store uni
suest vocation uni, cluster(country)
test vocation  == uni 

reg race vocation agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if uni==0
est store vocation
reg race uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if vocation==0
est store uni
suest vocation uni, cluster(country)
test vocation  == uni 

reg ppltrst vocation agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if uni==0
est store vocation
reg ppltrst uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if vocation==0
est store uni
suest vocation uni, cluster(country)
test vocation  == uni 

reg trstprl vocation agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if uni==0
est store vocation
reg trstprl uni agea squaredagea female uni_dad uni_mum income income_feel highss outsider2 pastunemp i.country i.essround if vocation==0
est store uni
suest vocation uni, cluster(country)
test vocation  == uni 

 

 